# 
# 
# Author: Guochun Shen
# Data:   2011-12-18
# Project:spatial statistic
# Email:  shenguochun@gmail.com
###############################################################################

test.get_marks=function(){
	mydata("phylo_mark_data")
	sp=get_marks(data.ppp,"sp")
	checkEquals(length(sp),data.ppp$n)
	sp=sort(as.character(unique(sp)))
	checkEquals(sp,paste("sp",1:5,sep=""))
	
	focal=get_marks(data.ppp,"focal")
	checkEquals(length(focal),data.ppp$n)
	
	twomarks=get_marks(data.ppp,c("sp","focal"))
	checkTrue(is.data.frame(twomarks))
	checkEquals(colnames(twomarks),c("sp","focal"))
	checkEquals(dim(twomarks),c(data.ppp$n,2))
}

